﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HidesaburoDotNET.Core.Detecctors
{
    public class SuankoDetector : YakuDetector
    {
        public override Yaku CheckYaku(AgariTehai agariTehai)
        {
            int ankoCount = 0;

            /*if (!agariTehai.Tsumo && agariTehai.AgariMentsu.Type != MentsuType.Toitsu)
            {
                return new Yaku();
            }*/



            foreach (Mentsu m in agariTehai.Mentsu)
            {
                if (m.Type == MentsuType.Anko || m.Type == MentsuType.Ankan)
                {
                    ankoCount++;
                }
            }
            if (ankoCount == 4)
            {
                return new Yaku(13, "スーアンコウ");
            }
            else
            {
                return new Yaku();
            }
        }
    }
}
